crowdfunding<-read.csv( "forqrm.csv" ,header=1)
crowdfunding_region<-read.csv( "forqrm.csv" ,header=1)
head(crowdfunding)
library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
rownames(crowdfunding)<-crowdfunding$State
se<-crowdfunding[c("GiniCoeff","pAdDeg","successful_rate")]
se
#cor
pie(table(crowdfunding_region$Region))
successful_rate2GiniCoeff<-lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff)#significant:0.00398
summary(successful_rate2GiniCoeff)
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$GiniCoeff)
Residuals:
Min 1Q Median 3Q Max
-0.197648 -0.054730 -0.003818 0.055170 0.201729
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.5417 0.2993 -1.810 0.07655 .
crowdfunding$GiniCoeff 2.0008 0.6613 3.026 0.00398 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08254 on 48 degrees of freedom
Multiple R-squared: 0.1602, Adjusted R-squared: 0.1427
F-statistic: 9.154 on 1 and 48 DF, p-value: 0.003981
successful_rate2NPov000s<-lm(crowdfunding$successful_rate~crowdfunding$NPov000s)#0.231
summary(successful_rate2NPov000s)
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$NPov000s)
Residuals:
Min 1Q Median 3Q Max
-0.230673 -0.041789 -0.001671 0.045678 0.193621
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.541e-01 1.642e-02 21.560 <2e-16 ***
crowdfunding$NPov000s 9.537e-06 1.113e-05 0.857 0.396
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08938 on 48 degrees of freedom
Multiple R-squared: 0.01507, Adjusted R-squared: -0.005451
F-statistic: 0.7343 on 1 and 48 DF, p-value: 0.3957
summary(lm(crowdfunding$successful_rate~crowdfunding$pHigh))#bad:0.2320
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$pHigh)
Residuals:
Min 1Q Median 3Q Max
-0.225211 -0.041414 -0.003402 0.046713 0.203517
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.7499 0.3198 2.345 0.0232 *
crowdfunding$pHigh -0.4451 0.3677 -1.211 0.2320
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08872 on 48 degrees of freedom
Multiple R-squared: 0.02963, Adjusted R-squared: 0.00941
F-statistic: 1.465 on 1 and 48 DF, p-value: 0.232
summary(lm(crowdfunding$successful_rate~crowdfunding$pBatDeg))#low:0.05511
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$pBatDeg)
Residuals:
Min 1Q Median 3Q Max
-0.23906 -0.06503 0.01415 0.05343 0.16307
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.22503 0.07128 3.157 0.00275 **
crowdfunding$pBatDeg 0.50740 0.25810 1.966 0.05511 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08665 on 48 degrees of freedom
Multiple R-squared: 0.07451, Adjusted R-squared: 0.05523
F-statistic: 3.865 on 1 and 48 DF, p-value: 0.05511
successful_rate2pAdDeg<-lm(crowdfunding$successful_rate~crowdfunding$pAdDeg)#significant:0.00501
summary(successful_rate2pAdDeg)
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.22412 -0.06718 0.01152 0.04708 0.15306
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.22570 0.04815 4.688 2.31e-05 ***
crowdfunding$pAdDeg 1.40251 0.47679 2.942 0.00501 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.0829 on 48 degrees of freedom
Multiple R-squared: 0.1527, Adjusted R-squared: 0.1351
F-statistic: 8.653 on 1 and 48 DF, p-value: 0.005015
#supplement regression
summary(lm(crowdfunding$GiniCoeff~crowdfunding$pAdDeg))#significant:0.0353
Call:
lm(formula = crowdfunding$GiniCoeff ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.031714 -0.014215 0.001214 0.013231 0.037791
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.431222 0.009986 43.184 <2e-16 ***
crowdfunding$pAdDeg 0.214191 0.098889 2.166 0.0353 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.01719 on 48 degrees of freedom
Multiple R-squared: 0.08904, Adjusted R-squared: 0.07006
F-statistic: 4.691 on 1 and 48 DF, p-value: 0.03531
summary(lm(crowdfunding$count_of_Grand.Total~crowdfunding$Pop2010))#significant:0.0353
Call:
lm(formula = crowdfunding$count_of_Grand.Total ~ crowdfunding$Pop2010)
Residuals:
Min 1Q Median 3Q Max
-696.93 -96.93 -0.61 74.90 1418.91
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.129e+02 5.125e+01 -2.203 0.0325 *
crowdfunding$Pop2010 5.039e-05 5.569e-06 9.048 6.03e-12 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 268 on 48 degrees of freedom
Multiple R-squared: 0.6304, Adjusted R-squared: 0.6227
F-statistic: 81.87 on 1 and 48 DF, p-value: 6.028e-12
#summary(lm(successful_rate2PovRate1$residuals~crowdfunding$pAdDeg))#0.0003881
#summary(lm(successful_rate2PovRate1$residuals~crowdfunding$GiniCoeff))#0.0264
summary(lm(successful_rate2GiniCoeff$residuals~crowdfunding$pAdDeg))#residuals ~ ADdeg:0.0368
Call:
lm(formula = successful_rate2GiniCoeff$residuals ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.187967 -0.048021 -0.005676 0.052160 0.167582
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.09539 0.04578 -2.083 0.0426 *
crowdfunding$pAdDeg 0.97396 0.45341 2.148 0.0368 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07884 on 48 degrees of freedom
Multiple R-squared: 0.0877, Adjusted R-squared: 0.06869
F-statistic: 4.614 on 1 and 48 DF, p-value: 0.03678
#summary(lm(successful_rate2GiniCoeff$residuals~crowdfunding$PovRate1))#residuals ~ PovRate1:0.771
#summary(lm(successful_rate2pAdDeg$residuals~crowdfunding$PovRate1))#0.004505
summary(lm(successful_rate2pAdDeg$residuals~crowdfunding$GiniCoeff))#0.0295
Call:
lm(formula = successful_rate2pAdDeg$residuals ~ crowdfunding$GiniCoeff)
Residuals:
Min 1Q Median 3Q Max
-0.195484 -0.051186 0.004758 0.054168 0.147777
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6411 0.2860 -2.242 0.0296 *
crowdfunding$GiniCoeff 1.4178 0.6319 2.244 0.0295 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07887 on 48 degrees of freedom
Multiple R-squared: 0.09492, Adjusted R-squared: 0.07606
F-statistic: 5.034 on 1 and 48 DF, p-value: 0.02951
#summary(lm(log(crowdfunding$average_pledged_amount_of_Grand.Total)~crowdfunding$GiniCoeff))#0.02357
hc<-hclust(dist(crowdfunding),method = "ward.D", members = NULL)
NAs introduced by coercion
plclust(hc)
'plclust' is deprecated.
Use 'plot' instead.
See help("Deprecated")
rect.hclust(hc,k=2)
heatmap(as.matrix(dist(crowdfunding,method= 'euclidean')),labRow = F, labCol = F)
NAs introduced by coercion
result<-cutree(hc,k=2)
result.category<-as.data.frame(result)
colnames(result.category)<-c("MDS_Category")
result.category
pie(result)
barplot(result,col =result )
#table(result)
#summary(result)
plot(result,type = "p",col=result,xlab="State",xaxt="n",ylab="MDS_Category")
library(ggplot2)
package 'ggplot2' was built under R version 3.3.2
mds2 <- -cmdscale(dist(crowdfunding))
NAs introduced by coercion
plot(mds2, type="n", axes=FALSE, ann=FALSE)
text(mds2, labels=rownames(mds2), xpd = NA)
mds<-cmdscale(dist(crowdfunding),k=2,eig=T)
NAs introduced by coercion
x = mds$points[,1]
y = mds$points[,2]
p=ggplot(data.frame(x,y),aes(x,y))
p+geom_point(size=5 , alpha=0.8 , aes(colour=factor(result) ))
NA
#regroup-------------------------------
#crowdfunding.backup<-crowdfunding
result.category["State"]<-row.names(result.category)
#crowdfunding<-crowdfunding[c("State","successful_rate","Region","count_of_Grand.Total","GiniCoeff","pAdDeg","pHigh","pBatDeg","Pop2010")]
#crowdfunding$Pop2010<-log(crowdfunding$Pop2010)
#crowdfunding$count_of_Grand.Total<-log(crowdfunding$count_of_Grand.Total)
crowdfunding<-merge(crowdfunding,result.category,all.x=TRUE)
#row.names(crowdfunding)<-crowdfunding$State
#GiniCoeff-------
par(mfrow=c(1,2))
plot(crowdfunding$successful_rate[crowdfunding$MDS_Category==1]~crowdfunding$GiniCoeff[crowdfunding$MDS_Category==1])
points(lowess(crowdfunding$successful_rate[crowdfunding$MDS_Category==1]~crowdfunding$GiniCoeff[crowdfunding$MDS_Category==1]),type="l",col="red")
plot(crowdfunding$successful_rate[crowdfunding$MDS_Category==2]~crowdfunding$GiniCoeff[crowdfunding$MDS_Category==2])
points(lowess(crowdfunding$successful_rate[crowdfunding$MDS_Category==2]~crowdfunding$GiniCoeff[crowdfunding$MDS_Category==2]),type="l",col="red")
summary(lm(crowdfunding$successful_rate[crowdfunding$MDS_Category==1]~crowdfunding$GiniCoeff[crowdfunding$MDS_Category==1]))
Call:
lm(formula = crowdfunding$successful_rate[crowdfunding$MDS_Category ==
1] ~ crowdfunding$GiniCoeff[crowdfunding$MDS_Category ==
1])
Residuals:
Min 1Q Median 3Q Max
-0.198796 -0.051943 -0.002387 0.054209 0.197760
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6421 0.3803 -1.689 0.0999 .
crowdfunding$GiniCoeff[crowdfunding$MDS_Category == 1] 2.2359 0.8487 2.634 0.0123 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08777 on 36 degrees of freedom
Multiple R-squared: 0.1616, Adjusted R-squared: 0.1383
F-statistic: 6.94 on 1 and 36 DF, p-value: 0.01235
summary(lm(crowdfunding$successful_rate[crowdfunding$MDS_Category==2]~crowdfunding$GiniCoeff[crowdfunding$MDS_Category==2]))
Call:
lm(formula = crowdfunding$successful_rate[crowdfunding$MDS_Category ==
2] ~ crowdfunding$GiniCoeff[crowdfunding$MDS_Category ==
2])
Residuals:
Min 1Q Median 3Q Max
-0.128261 -0.041117 -0.009601 0.055870 0.085466
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.8124 0.7597 -1.069 0.310
crowdfunding$GiniCoeff[crowdfunding$MDS_Category == 2] 2.5483 1.6283 1.565 0.149
Residual standard error: 0.067 on 10 degrees of freedom
Multiple R-squared: 0.1967, Adjusted R-squared: 0.1164
F-statistic: 2.449 on 1 and 10 DF, p-value: 0.1486
#pAdDeg-------
plot(crowdfunding$successful_rate[crowdfunding$MDS_Category==1]~crowdfunding$pAdDeg[crowdfunding$MDS_Category==1])
points(lowess(crowdfunding$successful_rate[crowdfunding$MDS_Category==1]~crowdfunding$pAdDeg[crowdfunding$MDS_Category==1]),type="l",col="red")
plot(crowdfunding$successful_rate[crowdfunding$MDS_Category==2]~crowdfunding$pAdDeg[crowdfunding$MDS_Category==2])
points(lowess(crowdfunding$successful_rate[crowdfunding$MDS_Category==2]~crowdfunding$pAdDeg[crowdfunding$MDS_Category==2]),type="l",col="red")
summary(lm(crowdfunding$successful_rate[crowdfunding$MDS_Category==1]~crowdfunding$pAdDeg[crowdfunding$MDS_Category==1]))
Call:
lm(formula = crowdfunding$successful_rate[crowdfunding$MDS_Category ==
1] ~ crowdfunding$pAdDeg[crowdfunding$MDS_Category == 1])
Residuals:
Min 1Q Median 3Q Max
-0.22501 -0.06782 0.01676 0.05208 0.15686
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.24079 0.05685 4.236 0.000151 ***
crowdfunding$pAdDeg[crowdfunding$MDS_Category == 1] 1.24109 0.57707 2.151 0.038292 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.09023 on 36 degrees of freedom
Multiple R-squared: 0.1139, Adjusted R-squared: 0.08924
F-statistic: 4.625 on 1 and 36 DF, p-value: 0.03829
summary(lm(crowdfunding$successful_rate[crowdfunding$MDS_Category==2]~crowdfunding$pAdDeg[crowdfunding$MDS_Category==2]))
Call:
lm(formula = crowdfunding$successful_rate[crowdfunding$MDS_Category ==
2] ~ crowdfunding$pAdDeg[crowdfunding$MDS_Category == 2])
Residuals:
Min 1Q Median 3Q Max
-0.09739 -0.03931 0.00642 0.04437 0.07161
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.13748 0.09196 1.495 0.1658
crowdfunding$pAdDeg[crowdfunding$MDS_Category == 2] 2.23782 0.84798 2.639 0.0248 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.05739 on 10 degrees of freedom
Multiple R-squared: 0.4105, Adjusted R-squared: 0.3516
F-statistic: 6.964 on 1 and 10 DF, p-value: 0.02478
par(mfrow=c(1,2) )
#count_of_Grand.Total
plot(crowdfunding$count_of_Grand.Total,col=crowdfunding$Region, main="Count of Projects Plot",ylab="Count of Projects",xaxt="n",xlab="State")
#axis(side=1,at=c(1,2,3,4,5,6,7,8),labels=c(crowdfunding$State))
legend("topright",legend = levels(crowdfunding$Region),cex = 0.8, pch = 1,col=1:4)
#successful_rate
plot(crowdfunding$successful_rate,col=crowdfunding$Region, main="Successful Rate Plot",ylab="Successful Rate",xaxt="n",xlab="State")
#axis(side=1,at=c(1,2,3,4,5,6,7,8),labels=c(crowdfunding$State))
legend("topleft",legend = levels(crowdfunding$Region),cex = 0.8, pch = 1,col=1:4)
par(mfrow=c(1,3))
#Boxplot for successful_rate and count_of_Grand.Total
#count_of_Grand.Total
boxplot(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="Midwest"],
crowdfunding$count_of_Grand.Total[crowdfunding$Region=="Northeast"],
crowdfunding$count_of_Grand.Total[crowdfunding$Region=="South"],
crowdfunding$count_of_Grand.Total[crowdfunding$Region=="West"],
names=levels(crowdfunding$Region),main="Count of Projects BoxPlot by Region",varwidth=TRUE)
require(moments)
Loading required package: moments
skewness(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="Midwest"])
[1] 1.547595
skewness(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="Northeast"])
[1] 2.368424
skewness(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="South"])
[1] 1.217785
skewness(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="West"])
[1] 3.007817
kurtosis(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="Midwest"])
[1] 4.72236
kurtosis(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="Northeast"])
[1] 6.812673
kurtosis(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="South"])
[1] 3.431574
kurtosis(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="West"])
[1] 10.40857
boxplot(log(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="Midwest"]),
log(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="Northeast"]),
log(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="South"]),
log(crowdfunding_region$count_of_Grand.Total[crowdfunding_region$Region=="West"]),
names=levels(crowdfunding$Region),main="Log Count of Projects BoxPlot by Region")
#successful_rate
boxplot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"],
crowdfunding$successful_rate[crowdfunding$Region=="Northeast"],
crowdfunding$successful_rate[crowdfunding$Region=="South"],
crowdfunding$successful_rate[crowdfunding$Region=="West"],
names=levels(crowdfunding$Region),main="Successful Rate BoxPlot by Region")
skewness(crowdfunding_region$successful_rate[crowdfunding_region$Region=="Midwest"])
[1] -0.6469442
skewness(crowdfunding_region$successful_rate[crowdfunding_region$Region=="Northeast"])
[1] -0.1748926
skewness(crowdfunding_region$successful_rate[crowdfunding_region$Region=="South"])
[1] -0.3792879
skewness(crowdfunding_region$successful_rate[crowdfunding_region$Region=="West"])
[1] -0.8937484
kurtosis(crowdfunding_region$successful_rate[crowdfunding_region$Region=="Midwest"])
[1] 2.9282
kurtosis(crowdfunding_region$successful_rate[crowdfunding_region$Region=="Northeast"])
[1] 1.466362
kurtosis(crowdfunding_region$successful_rate[crowdfunding_region$Region=="South"])
[1] 2.493975
kurtosis(crowdfunding_region$successful_rate[crowdfunding_region$Region=="West"])
[1] 3.664296
par(mfrow=c(2,4))
#count_of_Grand.Total
qqnorm(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="Midwest"],xlab="Midwest",xaxt="n",col="black",main="Count of Projects-Norm Q-Q Plot")
qqline(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="Midwest"])
qqnorm(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="Northeast"],xlab="Northeast",xaxt="n",col="red",main="Count of Projectse-Norm Q-Q Plot")
qqline(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="Northeast"])
qqnorm(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="South"],xlab="South",col="green",xaxt="n",main="Count of Projects-Norm Q-Q Plot")
qqline(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="South"])
qqnorm(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="West"],xlab="West",col="blue",xaxt="n",main="Count of Projects-Norm Q-Q Plot")
qqline(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="West"])
#successful_rate
qqnorm(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"],xlab="Midwest",col="black",xaxt="n",main="Successful Rate-Norm Q-Q Plot")
qqline(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"])
qqnorm(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"],xlab="Northeast",col="red",xaxt="n",main="Successful Rate-Norm Q-Q Plot")
qqline(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"])
qqnorm(crowdfunding$successful_rate[crowdfunding$Region=="South"],xlab="South",col="green",xaxt="n",main="Successful Rate-Norm Q-Q Plot")
qqline(crowdfunding$successful_rate[crowdfunding$Region=="South"])
qqnorm(crowdfunding$successful_rate[crowdfunding$Region=="West"],xlab="West",col="blue",xaxt="n",main="Successful Rate-Norm Q-Q Plot")
qqline(crowdfunding$successful_rate[crowdfunding$Region=="West"])
kurtosis(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"])
[1] 2.9282
kurtosis(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"])
[1] 1.466362
kurtosis(crowdfunding$successful_rate[crowdfunding$Region=="South"])
[1] 2.493975
kurtosis(crowdfunding$successful_rate[crowdfunding$Region=="West"])
[1] 3.664296
par(mfrow=c(1,3))
qqnorm(crowdfunding$successful_rate, main ="Successful rate:Q-Q norm",col="red")
qqline(crowdfunding$successful_rate)
qqnorm(crowdfunding$GiniCoeff, main ="GiniCoeff:Q-Q norm",col="blue")
qqline(crowdfunding$GiniCoeff)
qqnorm(crowdfunding$pAdDeg, main ="pAdDeg:Q-Q norm",col="green")
qqline(crowdfunding$pAdDeg)
cor.test(crowdfunding$successful_rate,crowdfunding$GiniCoeff)
Pearson's product-moment correlation
data: crowdfunding$successful_rate and crowdfunding$GiniCoeff
t = 3.0255, df = 48, p-value = 0.003981
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.1371263 0.6105363
sample estimates:
cor
0.4001989
cor.test(crowdfunding$successful_rate,crowdfunding$pAdDeg,method="spearman")
Cannot compute exact p-value with ties
Spearman's rank correlation rho
data: crowdfunding$successful_rate and crowdfunding$pAdDeg
S = 12634, p-value = 0.004719
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.3933076
boxplot(crowdfunding$GiniCoeff[crowdfunding$Region=="Midwest"],crowdfunding$GiniCoeff[crowdfunding$Region=="Northeast"],crowdfunding$GiniCoeff[crowdfunding$Region=="South"],crowdfunding$GiniCoeff[crowdfunding$Region=="West"],names=levels(crowdfunding$Region),main="GiniCoeff BoxPlot by Region",varwidth=TRUE)
boxplot(crowdfunding$pAdDeg[crowdfunding$Region=="Midwest"],crowdfunding$pAdDeg[crowdfunding$Region=="Northeast"],crowdfunding$pAdDeg[crowdfunding$Region=="South"],crowdfunding$pAdDeg[crowdfunding$Region=="West"],names=levels(crowdfunding$Region),main="pAdDeg BoxPlot by Region",varwidth=TRUE)
summary(lm(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Midwest"]))
Call:
lm(formula = crowdfunding$successful_rate[crowdfunding$Region ==
"Midwest"] ~ crowdfunding$GiniCoeff[crowdfunding$Region ==
"Midwest"])
Residuals:
Min 1Q Median 3Q Max
-0.159935 -0.042151 0.001007 0.042888 0.126971
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.9201 0.9832 -1.953 0.0794 .
crowdfunding$GiniCoeff[crowdfunding$Region == "Midwest"] 5.1042 2.2205 2.299 0.0444 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08428 on 10 degrees of freedom
Multiple R-squared: 0.3457, Adjusted R-squared: 0.2803
F-statistic: 5.284 on 1 and 10 DF, p-value: 0.04435
par(mfrow=c(1,4))
#GiniCoeff---------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Midwest"],xlab="GiniCoeff in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$GiniCoeff[crowdfunding$Region=="West"],xlab="GiniCoeff in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$GiniCoeff[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$GiniCoeff[crowdfunding$Region=="South"],xlab="GiniCoeff in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$GiniCoeff[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Northeast"],xlab="GiniCoeff in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Northeast"]),col="red",type="l")
#pAdDeg-----------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pAdDeg[crowdfunding$Region=="Midwest"],xlab="pAdDeg in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pAdDeg[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pAdDeg[crowdfunding$Region=="West"],xlab="pAdDeg in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pAdDeg[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pAdDeg[crowdfunding$Region=="South"],xlab="pAdDeg in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pAdDeg[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pAdDeg[crowdfunding$Region=="Northeast"],xlab="pAdDeg in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pAdDeg[crowdfunding$Region=="Northeast"]),col="red",type="l")
#pBatDeg-----------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pBatDeg[crowdfunding$Region=="Midwest"],xlab="pBatDeg in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pBatDeg[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pBatDeg[crowdfunding$Region=="West"],xlab="pBatDeg in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pBatDeg[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pBatDeg[crowdfunding$Region=="South"],xlab="pBatDeg in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pBatDeg[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pBatDeg[crowdfunding$Region=="Northeast"],xlab="pBatDeg in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pBatDeg[crowdfunding$Region=="Northeast"]),col="red",type="l")
#pHigh-----------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pHigh[crowdfunding$Region=="Midwest"],xlab="pHigh in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pHigh[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pHigh[crowdfunding$Region=="West"],xlab="pHigh in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pHigh[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pHigh[crowdfunding$Region=="South"],xlab="pHigh in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pHigh[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pHigh[crowdfunding$Region=="Northeast"],xlab="pHigh in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pHigh[crowdfunding$Region=="Northeast"]),col="red",type="l")
par(mfrow=c(1,4))
#GiniCoeff---------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Midwest"],xlab="GiniCoeff in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$GiniCoeff[crowdfunding$Region=="West"],xlab="GiniCoeff in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$GiniCoeff[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$GiniCoeff[crowdfunding$Region=="South"],xlab="GiniCoeff in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$GiniCoeff[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Northeast"],xlab="GiniCoeff in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$GiniCoeff[crowdfunding$Region=="Northeast"]),col="red",type="l")
#pAdDeg-----------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pAdDeg[crowdfunding$Region=="Midwest"],xlab="pAdDeg in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pAdDeg[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pAdDeg[crowdfunding$Region=="West"],xlab="pAdDeg in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pAdDeg[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pAdDeg[crowdfunding$Region=="South"],xlab="pAdDeg in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pAdDeg[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pAdDeg[crowdfunding$Region=="Northeast"],xlab="pAdDeg in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pAdDeg[crowdfunding$Region=="Northeast"]),col="red",type="l")
#pBatDeg-----------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pBatDeg[crowdfunding$Region=="Midwest"],xlab="pBatDeg in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pBatDeg[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pBatDeg[crowdfunding$Region=="West"],xlab="pBatDeg in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pBatDeg[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pBatDeg[crowdfunding$Region=="South"],xlab="pBatDeg in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pBatDeg[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pBatDeg[crowdfunding$Region=="Northeast"],xlab="pBatDeg in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pBatDeg[crowdfunding$Region=="Northeast"]),col="red",type="l")
#pHigh-----------
plot(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pHigh[crowdfunding$Region=="Midwest"],xlab="pHigh in Midwest",ylab="Successful rate in Midwest")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"]~crowdfunding$pHigh[crowdfunding$Region=="Midwest"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pHigh[crowdfunding$Region=="West"],xlab="pHigh in West",ylab="Successful rate in West")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="West"]~crowdfunding$pHigh[crowdfunding$Region=="West"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pHigh[crowdfunding$Region=="South"],xlab="pHigh in South",ylab="Successful rate in South")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="South"]~crowdfunding$pHigh[crowdfunding$Region=="South"]),col="red",type="l")
plot(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pHigh[crowdfunding$Region=="Northeast"],xlab="pHigh in Northeast",ylab="Successful rate in Northeast")
points(lowess(crowdfunding$successful_rate[crowdfunding$Region=="Northeast"]~crowdfunding$pHigh[crowdfunding$Region=="Northeast"]),col="red",type="l")
#t.test(crowdfunding$successful_rate[crowdfunding$Region=="West"],crowdfunding$successful_rate[crowdfunding$Region=="Northeast"])
#t.test(crowdfunding$count_of_Grand.Total[crowdfunding$Region=="West"],crowdfunding$count_of_Grand.Total[crowdfunding$Region=="Northeast"])
#calcualte P Value in the t.test of Successful Rate by Region
p=NULL
temp<-NULL
for (location1 in c(levels(crowdfunding$Region))){
for (location2 in c(levels(crowdfunding$Region))){
if (1){
temp<-t.test(crowdfunding$successful_rate[crowdfunding$Region==location1],crowdfunding$successful_rate[crowdfunding$Region==location2])
if(temp$p.value<=0.1){
#print(c(location1,location2,temp$p.value))
}
p<-c(p,temp$p.value)}}}
SR.t.test.p.vlaue<-as.data.frame(matrix(p,4,4),row.names = c(levels(crowdfunding$Region)))
colnames(SR.t.test.p.vlaue)<-c(levels(crowdfunding$Region))
print("Successful Rate by Region")
[1] "Successful Rate by Region"
SR.t.test.p.vlaue
#--------------------------------------------------------
#calcualte P Value in the t.test of Count of projects by Region
p=NULL
temp<-NULL
for (location1 in c(levels(crowdfunding$Region))){
for (location2 in c(levels(crowdfunding$Region))){
if (1){
temp<-t.test(log(crowdfunding$count_of_Grand.Total[crowdfunding$Region==location1]),log(crowdfunding$count_of_Grand.Total[crowdfunding$Region==location2]))
if(temp$p.value<=0.1){
#print(c(location1,location2,temp$p.value))
}
p<-c(p,temp$p.value)}}}
CP.t.test.p.vlaue<-as.data.frame(matrix(p,4,4),row.names = c(levels(crowdfunding$Region)))
colnames(CP.t.test.p.vlaue)<-c(levels(crowdfunding$Region))
print("Count of Projects by Region ")
[1] "Count of Projects by Region "
CP.t.test.p.vlaue
#--------------------------------------------------------
#calcualte P Value in the t.test of Count of projects by kmeans
"MDS-Category"
[1] "MDS-Category"
p=NULL
temp<-NULL
#for (location1 in 1:4){
# for (location2 in 1:4){
# if (1){
# temp<-t.test(crowdfunding$successful_rate[crowdfunding$MDS_Category==location1],crowdfunding$successful_rate[crowdfunding$MDS_Category==location2])
# if(temp$p.value<=0.1){
# print(c(location1,location2,temp$p.value))
# }
# p<-c(p,temp$p.value)}}}
#MDSR.t.test.p.vlaue<-as.data.frame(matrix(p,4,4),row.names = c(1:4))
#colnames(MDSR.t.test.p.vlaue)<-c(1:4)
#print("Successful Rate by Region")
#MDSR.t.test.p.vlaue
wilcox.test(Northeast.SR.bootstrap,West.SR.bootstrap)
Wilcoxon rank sum test with continuity correction
data: Northeast.SR.bootstrap and West.SR.bootstrap
W = 994490, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
wilcox.test(Northeast.SR.bootstrap,South.SR.bootstrap)
Wilcoxon rank sum test with continuity correction
data: Northeast.SR.bootstrap and South.SR.bootstrap
W = 988070, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
wilcox.test(Northeast.SR.bootstrap,Midwest.SR.bootstrap)
Wilcoxon rank sum test with continuity correction
data: Northeast.SR.bootstrap and Midwest.SR.bootstrap
W = 990780, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
wilcox.test(West.SR.bootstrap,Midwest.SR.bootstrap)
Wilcoxon rank sum test with continuity correction
data: West.SR.bootstrap and Midwest.SR.bootstrap
W = 471150, p-value = 0.02549
alternative hypothesis: true location shift is not equal to 0
wilcox.test(West.SR.bootstrap,South.SR.bootstrap)
Wilcoxon rank sum test with continuity correction
data: West.SR.bootstrap and South.SR.bootstrap
W = 207160, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
wilcox.test(Midwest.SR.bootstrap,South.SR.bootstrap)
Wilcoxon rank sum test with continuity correction
data: Midwest.SR.bootstrap and South.SR.bootstrap
W = 260520, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
wilcox.test(crowdfunding$successful_rate[crowdfunding$Region=="West"],crowdfunding$successful_rate[crowdfunding$Region=="Northeast"])
Wilcoxon rank sum test
data: crowdfunding$successful_rate[crowdfunding$Region == "West"] and crowdfunding$successful_rate[crowdfunding$Region == "Northeast"]
W = 29, p-value = 0.05135
alternative hypothesis: true location shift is not equal to 0
wilcox.test(crowdfunding$successful_rate[crowdfunding$Region=="Midwest"],crowdfunding$successful_rate[crowdfunding$Region=="Northeast"])
Wilcoxon rank sum test
data: crowdfunding$successful_rate[crowdfunding$Region == "Midwest"] and crowdfunding$successful_rate[crowdfunding$Region == "Northeast"]
W = 28, p-value = 0.06928
alternative hypothesis: true location shift is not equal to 0
wilcox.test(crowdfunding$successful_rate[crowdfunding$Region=="South"],crowdfunding$successful_rate[crowdfunding$Region=="Northeast"])
cannot compute exact p-value with ties
Wilcoxon rank sum test with continuity correction
data: crowdfunding$successful_rate[crowdfunding$Region == "South"] and crowdfunding$successful_rate[crowdfunding$Region == "Northeast"]
W = 43, p-value = 0.1066
alternative hypothesis: true location shift is not equal to 0
wilcox.test(crowdfunding$successful_rate[crowdfunding$Region=="West"],crowdfunding$successful_rate[crowdfunding$Region=="Midwest"])
cannot compute exact p-value with ties
Wilcoxon rank sum test with continuity correction
data: crowdfunding$successful_rate[crowdfunding$Region == "West"] and crowdfunding$successful_rate[crowdfunding$Region == "Midwest"]
W = 75, p-value = 0.8918
alternative hypothesis: true location shift is not equal to 0
This article is to analyse the factors to the crowdfunding successful rate. I guess the Education, the inequity of family income and the poverty rate may be related to the crowdfunding successful rate. and in the follow context, i will analyse the those factors.
Firstly, The Statistical Summary ### Factors Analysis-Statistical Summary
library(moments)
summary(crowdfunding$successful_rate)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1250 0.3179 0.3636 0.3631 0.4095 0.5484
kurtosis(crowdfunding$successful_rate)
[1] 3.630147
summary(crowdfunding$GiniCoeff)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.4190 0.4400 0.4530 0.4522 0.4658 0.4990
kurtosis(crowdfunding$GiniCoeff)
[1] 2.552647
summary(crowdfunding$pAdDeg)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.06100 0.07950 0.09200 0.09794 0.11000 0.16400
kurtosis(crowdfunding$pAdDeg)
[1] 3.382781
summary(crowdfunding$PovRate1)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0920 0.1212 0.1480 0.1480 0.1705 0.2190
kurtosis(crowdfunding$PovRate1)
[1] 2.159154
boxplot(crowdfunding$successful_rate,crowdfunding$GiniCoeff,crowdfunding$pAdDeg,crowdfunding$PovRate1,names = c("Successful Rate","GiniCoeff","Higher Education","PovRate1"),main="Factors Box Plot")
par(mfrow=c(1,4))
plot(crowdfunding$successful_rate,col=crowdfunding$Region,pch=10,cex=1.5,xlab="State",ylab="Successful Rate",xaxt="n",main="Successful Rate Plot with lowess line")
points(lowess(crowdfunding$successful),type="l")
legend("topleft",legend = levels(crowdfunding$Region),cex = 0.8, pch = 1,col=1:4)
plot(crowdfunding$GiniCoeff,col=crowdfunding$Region,pch=18,cex=1.5,xlab="State",xaxt="n",ylab="GiniCoeff ",xaxt="n",main="GiniCoeff Plot with lowess line")
points(lowess(crowdfunding$GiniCoeff),type="l")
legend("topleft",legend = levels(crowdfunding$Region),cex = 0.8, pch = 1,col=1:4)
plot(crowdfunding$pAdDeg,col=crowdfunding$Region,pch=15,cex=1.5,xlab="State",xaxt="n",ylab="Adanced Education Rate",xaxt="n",main="Adanced Education Rate Plot with lowess line")
points(lowess(crowdfunding$pAdDeg),type="l")
legend("topright",legend = levels(crowdfunding$Region),cex = 0.8, pch = 1,col=1:4)
plot(crowdfunding$pAdDeg,col=crowdfunding$Region,pch=15,cex=1.5,xlab="State",xaxt="n",ylab="Adanced Education Rate",xaxt="n",main="Adanced Education Rate Plot with lowess line")
points(lowess(crowdfunding$pAdDeg),type="l")
legend("topright",legend = levels(crowdfunding$Region),cex = 0.8, pch = 1,col=1:4)
require(car)
Loading required package: car
package 'car' was built under R version 3.3.2
scatterplotMatrix(~successful_rate+PovRate1+pAdDeg,data=crowdfunding,spread=1,upper.panel=NULL,main="Scatter Plot Matrix on Factors")
require(moments)
kurtosis(crowdfunding$pAdDeg)
[1] 3.382781
#plot(crowdfunding$PovRate1,col="black",pch=16,xlab="State",xaxt="n",ylab="Poverty Rate",xaxt="n",main="Poverty Rate Plot")
#library(gridExtra)
summary(lm(log(successful_rate)~log(Collectivism),data=crowdfunding))
Call:
lm(formula = log(successful_rate) ~ log(Collectivism), data = crowdfunding)
Residuals:
Min 1Q Median 3Q Max
-0.88745 -0.11958 0.01185 0.12325 0.51358
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.7061 0.7085 -3.819 0.000384 ***
log(Collectivism) 0.4259 0.1819 2.341 0.023406 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2802 on 48 degrees of freedom
Multiple R-squared: 0.1025, Adjusted R-squared: 0.08381
F-statistic: 5.483 on 1 and 48 DF, p-value: 0.02341
ggplot(crowdfunding,aes(y=successful_rate,x=Collectivism))+geom_point()+geom_smooth(method="lm")
library(car)
scatterplot(crowdfunding$successful_rate,log(crowdfunding$average_of_goal_Grand.Total),pch=19)
scatterplot(crowdfunding$successful_rate~crowdfunding$GiniCoeff,pch=19)
scatterplot(crowdfunding$successful_rate~crowdfunding$PovRate1,pch=19)
scatterplot(crowdfunding$successful_rate~crowdfunding$Densitym2,pch=19)
scatterplot(crowdfunding$successful_rate~crowdfunding$pHigh,pch=19)
scatterplot(crowdfunding$successful_rate~crowdfunding$pBatDeg,pch=19)
scatterplot(crowdfunding$successful_rate~crowdfunding$pAdDeg,pch=19)
#redo scatterplot with Successful Rate-PovRate1
scatterplot(crowdfunding$successful_rate,crowdfunding$PovRate1,pch=19)
#anova(successful_rate2PovRate1)
library(ggplot2)
ggplot(crowdfunding,aes(x=PovRate1,y=successful_rate,main = "Successful rate~PovRate"))+geom_point(aes(col=Region))+geom_smooth(method = "loess")+ggtitle("Successful Rate-PovRate1 Plot")+theme(plot.title=element_text(hjust=0.5))
par(mfrow=c(1,2))
boxplot(crowdfunding$successful_rate,crowdfunding$PovRate1,names=c("Successful Rate","PovRate1"))
boxplot(crowdfunding$successful_rate[crowdfunding$PovRate1>mean(crowdfunding$PovRate1)],crowdfunding$successful_rate[crowdfunding$PovRate1<=mean(crowdfunding$PovRate1)],col = c("green","deepskyblue"),names=c("Successful%(High PovRate)","Successful%(Low PovRate)"),xlab="Successful rate by PovRate1")
t.test(crowdfunding$successful_rate[crowdfunding$PovRate1>mean(crowdfunding$PovRate1)],crowdfunding$successful_rate[crowdfunding$PovRate1<=mean(crowdfunding$PovRate1)])
Welch Two Sample t-test
data: crowdfunding$successful_rate[crowdfunding$PovRate1 > mean(crowdfunding$PovRate1)] and crowdfunding$successful_rate[crowdfunding$PovRate1 <= mean(crowdfunding$PovRate1)]
t = -0.01904, df = 43.704, p-value = 0.9849
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.05105839 0.05010288
sample estimates:
mean of x mean of y
0.3628157 0.3632935
plot(crowdfunding$PovRate1,crowdfunding$successful_rate,pch=19,col=crowdfunding$Region,ylab="Successful Rate",xlab="PovRate1",main="Successful Rate-PovRate1 Plot with lowess line")
points(lowess(crowdfunding$PovRate1,crowdfunding$successful_rate,f=1/3),pch=4,col="orange",type="l")
#abline(lm(crowdfunding$successful_rate~crowdfunding$PovRate1),col="orange")
legend("bottomright",legend = levels(crowdfunding$Region),cex = 0.8, pch = 19,col=1:4)
qqplot(crowdfunding$PovRate1,crowdfunding$successful_rate,pch=1,col=crowdfunding$Region,main="QQ plot: (Successful Rate & PovRate)")
qqline(crowdfunding$PovRate1 ,crowdfunding$successful_rate,col="red")
the condition has length > 1 and only the first element will be used
legend("topleft",legend = levels(crowdfunding$Region), pch = 19,col=1:3)
par(mfrow=c(1,1))
#qqnorm(crowdfunding$successful_rate,col=crowdfunding$Region,xlab="Successful Rate")
#qqline(crowdfunding$successful_rate,col="red")
qqnorm(crowdfunding$PovRate1,col=crowdfunding$Region,pch=18,xlab ="PovRate1")
qqline(crowdfunding$PovRate1,col="red")
require(ggplot2)
ggplot(crowdfunding,aes(x=PovRate1,y=successful_rate,main = "Successful rate~PovRate1"))+geom_point(aes(group=1,col=Region))+geom_smooth(method = "loess",se=FALSE,aes(group=2,col="Loess Line"),lty="dashed")+geom_smooth(method = "lm",aes(group=2,col="Regression Line"),cex=0.8,lty=1)+ggtitle("Successful Rate-PovRate1 Plot with Loess line and OLS-estimated line")+labs(x="PovRate1",y="Successful Rate")+theme(plot.title=element_text(hjust=0.5))+scale_colour_manual(values = c("purple", "magenta", "orange","red", "blue", "green3" ),guide = guide_legend(title="Legend",override.aes = list(linetype = c( "dashed",rep("blank", 2), "solid",rep("blank", 2)),shape = c(NA,rep(16, 2), NA,rep(16, 2) ))))
require(lmtest)
require(strucchange)
Loading required package: strucchange
Loading required package: sandwich
resettest(crowdfunding$successful_rate~crowdfunding$GiniCoeff+(crowdfunding$GiniCoeff)^2)
RESET test
data: crowdfunding$successful_rate ~ crowdfunding$GiniCoeff + (crowdfunding$GiniCoeff)^2
RESET = 0.62108, df1 = 2, df2 = 46, p-value = 0.5418
sctest(log(crowdfunding$successful_rate)~log(crowdfunding$GiniCoeff),type="Chow")
Chow test
data: log(crowdfunding$successful_rate) ~ log(crowdfunding$GiniCoeff)
F = 2.5789, p-value = 0.08679
resettest(log(crowdfunding$successful_rate)~log(crowdfunding$pAdDeg))
RESET test
data: log(crowdfunding$successful_rate) ~ log(crowdfunding$pAdDeg)
RESET = 1.7729, df1 = 2, df2 = 46, p-value = 0.1812
sctest(crowdfunding$successful_rate~crowdfunding$pAdDeg,type="Chow",point=0.12)
Chow test
data: crowdfunding$successful_rate ~ crowdfunding$pAdDeg
F = 0.55801, p-value = 0.5762
plot(crowdfunding$successful_rate~crowdfunding$pAdDeg)
points(lowess(crowdfunding$successful_rate~crowdfunding$pAdDeg),type="l")
b=NA
for (i in 150:170){
a<-sctest(log(crowdfunding$successful_rate)~log(crowdfunding$pAdDeg),type="Chow",point=i/1000)
b[i]=a$p.value
#if (a$p.value<=0.05){print (i/100)}
}
plot(b,type="l")
b[9]
[1] NA
sctest(log(crowdfunding$successful_rate)~log(crowdfunding$pAdDeg),type="Chow",point=0.17)
Chow test
data: log(crowdfunding$successful_rate) ~ log(crowdfunding$pAdDeg)
F = 1.9269, p-value = 0.1572
ggplot(crowdfunding,aes(x=GiniCoeff,y=successful_rate,main = "Successful rate~GiniCoeff"))+geom_point(group=1,aes(col=Region))+geom_smooth(method = "loess",se=FALSE,lty="dashed",aes(group=2,col="Trendline"))+geom_smooth(method = "lm",aes(group=2,col="Regression"),lty=1,cex=0.5)+ggtitle("Successful Rate-GiniCoeff Plot with loess line and OLS-estimated line")+labs(x="GiniCoeff",y="Successful Rate")+theme(plot.title=element_text(hjust=0.5))
anova(successful_rate2GiniCoeff)
Analysis of Variance Table
Response: crowdfunding$successful_rate
Df Sum Sq Mean Sq F value Pr(>F)
crowdfunding$GiniCoeff 1 0.06236 0.062361 9.1537 0.003981 **
Residuals 48 0.32701 0.006813
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t.test(crowdfunding$successful_rate[crowdfunding$GiniCoeff>mean(crowdfunding$GiniCoeff)],crowdfunding$successful_rate[crowdfunding$GiniCoeff<=mean(crowdfunding$GiniCoeff)])
Welch Two Sample t-test
data: crowdfunding$successful_rate[crowdfunding$GiniCoeff > mean(crowdfunding$GiniCoeff)] and crowdfunding$successful_rate[crowdfunding$GiniCoeff <= mean(crowdfunding$GiniCoeff)]
t = 1.6383, df = 43.111, p-value = 0.1086
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.009375926 0.090607105
sample estimates:
mean of x mean of y
0.3833720 0.3427564
par(mfrow=c(1,2))
boxplot(crowdfunding$successful_rate,crowdfunding$GiniCoeff,names=c("Successful Rate","GiniCoeff"))
boxplot(crowdfunding$successful_rate[crowdfunding$GiniCoeff>mean(crowdfunding$GiniCoeff)],crowdfunding$successful_rate[crowdfunding$GiniCoeff<=mean(crowdfunding$GiniCoeff)],col = c("darkorchid2","dodgerblue"),names=c("Successful%(High GiniCoeff)","Successful%(Low GiniCoeff)"),xlab="Successful rate by GiniCoeff")
plot(crowdfunding$successful_rate,crowdfunding$GiniCoeff,f=1/3 ,pch=19,col="blue",xlab="Successful Rate",ylab="GiniCoeff",main="Successful Rate-GiniCoeff Plot with lowess line")
points(lowess(crowdfunding$successful_rate,crowdfunding$GiniCoeff,f=1/3),pch=4,col="red",type="l")
qqplot(crowdfunding$GiniCoeff,crowdfunding$successful_rate,pch=18,main="Q-Q Plot: Successful Rate-GiniCoeff with lowess line",xlab="Gini Coefficient",ylab="Successful Rate")
points(lowess(crowdfunding$GiniCoeff,crowdfunding$successful_rate),type="l",col="red")
#qqline(crowdfunding$successful_rate,crowdfunding$GiniCoeff)
#qqnorm(crowdfunding$successful_rate,col="orange",xlab="Successful Rate")
#qqline(crowdfunding$successful_rate,col="red")
par(mfrow=c(1,1))
qqnorm(crowdfunding$GiniCoeff,col="blue",pch=20,xlab="GiniCoeff")
qqline(crowdfunding$GiniCoeff,col="red")
summary(lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff))
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$GiniCoeff)
Residuals:
Min 1Q Median 3Q Max
-0.197648 -0.054730 -0.003818 0.055170 0.201729
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.5417 0.2993 -1.810 0.07655 .
crowdfunding$GiniCoeff 2.0008 0.6613 3.026 0.00398 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08254 on 48 degrees of freedom
Multiple R-squared: 0.1602, Adjusted R-squared: 0.1427
F-statistic: 9.154 on 1 and 48 DF, p-value: 0.003981
ggplot(crowdfunding,aes(x=GiniCoeff,y=successful_rate,main = "Successful rate~GiniCoeff"))+geom_point(aes(group=1,col=Region))+geom_smooth(method = "loess",se=FALSE,aes(group=2,col="Loess Line"),lty="dashed")+geom_smooth(method = "lm",aes(group=2,col="Regression Line"),cex=0.8,lty=1)+ggtitle("Successful Rate-GiniCoeff Plot with Loess line and OLS-estimated line")+labs(x="GiniCoeff",y="Successful Rate")+theme(plot.title=element_text(hjust=0.5))+scale_colour_manual(values = c("purple", "magenta", "orange","red", "blue", "green3" ),guide = guide_legend(title="Legend",override.aes = list(linetype = c( "dashed",rep("blank", 2), "solid",rep("blank", 2)),shape = c(NA,rep(16, 2), NA,rep(16, 2) ))))
ggplot(crowdfunding,aes(x=pAdDeg,y=successful_rate))+geom_point(aes(col=Region))+geom_smooth(method = "loess",se=FALSE,lty=2,aes(col="Loess Line"))+geom_smooth(method = "lm",aes(col="Regression Line"),cex=0.8)+ggtitle("Successful Rate-Adanced Education Plot with Loess line and OLS-estimated line")+labs(x="Advanced Education",y="Successful Rate")+theme(plot.title=element_text(hjust=0.5))+scale_colour_manual(values = c("purple", "magenta","orange", "red", "blue", "green3" ),guide = guide_legend(title="Legend",override.aes = list(linetype = c( "dashed",rep("blank", 2), "solid",rep("blank", 2)),shape = c( NA,rep(16, 2), NA,rep(16, 2)))))
ggplot(crowdfunding,aes(x=pAdDeg,y=successful_rate))+geom_point(aes(col=Region))+geom_smooth(method = "loess",se=FALSE,lty=2)+geom_smooth(method = "lm",col="red",cex=0.8)+ggtitle("Successful Rate-Adanced Education Plot")+labs(x="Advanced Education",y="Successful Rate")+theme(plot.title=element_text(hjust=0.5))
plot(lowess(crowdfunding$pAdDeg,crowdfunding$successful_rate))
anova(successful_rate2pAdDeg)
Analysis of Variance Table
Response: crowdfunding$successful_rate
Df Sum Sq Mean Sq F value Pr(>F)
crowdfunding$pAdDeg 1 0.05947 0.059469 8.6527 0.005015 **
Residuals 48 0.32990 0.006873
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow=c(1,2))
boxplot(crowdfunding$successful_rate,crowdfunding$pAdDeg,names=c("Successful rate","Adanced Education"))
boxplot(crowdfunding$successful_rate[crowdfunding$pAdDeg>mean(crowdfunding$pAdDeg)],crowdfunding$successful_rate[crowdfunding$pAdDeg<=mean(crowdfunding$pAdDeg)],col = c("darkorchid2","dodgerblue"),names=c("Successful%(High Adanced Education)","Successful%(Low Adanced Education)"),xlab="Successful rate by Adanced Education")
t.test(crowdfunding$successful_rate[crowdfunding$pAdDeg>mean(crowdfunding$pAdDeg)],crowdfunding$successful_rate[crowdfunding$pAdDeg<=mean(crowdfunding$pAdDeg)])
Welch Two Sample t-test
data: crowdfunding$successful_rate[crowdfunding$pAdDeg > mean(crowdfunding$pAdDeg)] and crowdfunding$successful_rate[crowdfunding$pAdDeg <= mean(crowdfunding$pAdDeg)]
t = 3.5483, df = 45.573, p-value = 0.0009119
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.03480093 0.12610121
sample estimates:
mean of x mean of y
0.4097258 0.3292747
plot(crowdfunding$successful_rate,crowdfunding$pAdDeg,f=1/3 ,pch=19,col="blue",xlab="Successful Rate",ylab="Adanced Education",main="Successful Rate-Adanced Education Plot with lowess line")
points(lowess(crowdfunding$successful_rate,crowdfunding$pAdDeg,f=1/3),pch=4,col="red",type="l")
qqplot(crowdfunding$successful_rate,crowdfunding$pAdDeg,pch=19,col="red",main="Q-Q Plot: Successful Rate-Adanced Education")
qqline(crowdfunding$successful_rate,crowdfunding$pAdDeg)
the condition has length > 1 and only the first element will be used
#qqnorm(crowdfunding$successful_rate,col="orange",xlab="Successful Rate")
#qqline(crowdfunding$successful_rate,col="red")
par(mfrow=c(1,1))
qqnorm(crowdfunding$pAdDeg,col="blue",pch=20,xlab="Adanced Education")
qqline(crowdfunding$pAdDeg,col="red")
summary(lm(crowdfunding$successful_rate~crowdfunding$pAdDeg))
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.22412 -0.06718 0.01152 0.04708 0.15306
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.22570 0.04815 4.688 2.31e-05 ***
crowdfunding$pAdDeg 1.40251 0.47679 2.942 0.00501 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.0829 on 48 degrees of freedom
Multiple R-squared: 0.1527, Adjusted R-squared: 0.1351
F-statistic: 8.653 on 1 and 48 DF, p-value: 0.005015
require(ggplot2)
ggplot(crowdfunding,aes(x=pAdDeg,y=GiniCoeff))+geom_point(aes(col=Region))+geom_smooth(method = "loess",se=FALSE,lty=2)+geom_smooth(method = "lm",col="red",cex=0.8)+ggtitle("Successful Rate-Adanced Education Plot")+labs(x="Advanced Education",y="GiniCoeff")+theme(plot.title=element_text(hjust=0.5))
plot(lowess(crowdfunding$pAdDeg,crowdfunding$GiniCoeff))
par(mfrow=c(1,2))
boxplot(crowdfunding$GiniCoeff,crowdfunding$pAdDeg,names=c("Successful rate","Adanced Education"))
boxplot(crowdfunding$GiniCoeff[crowdfunding$pAdDeg>mean(crowdfunding$pAdDeg)],crowdfunding$GiniCoeff[crowdfunding$pAdDeg<=mean(crowdfunding$pAdDeg)],col = c("darkorchid2","dodgerblue"),names=c("GiniCoeff(High Adanced Education)","GiniCoeff(Low Adanced Education)"),xlab="GiniCoeff by Adanced Education")
t.test(crowdfunding$GiniCoeff[crowdfunding$pAdDeg>mean(crowdfunding$pAdDeg)],crowdfunding$GiniCoeff[crowdfunding$pAdDeg<=mean(crowdfunding$pAdDeg)])
Welch Two Sample t-test
data: crowdfunding$GiniCoeff[crowdfunding$pAdDeg > mean(crowdfunding$pAdDeg)] and crowdfunding$GiniCoeff[crowdfunding$pAdDeg <= mean(crowdfunding$pAdDeg)]
t = 1.6166, df = 41.849, p-value = 0.1135
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.002035865 0.018423386
sample estimates:
mean of x mean of y
0.4569524 0.4487586
plot(crowdfunding$GiniCoeff,crowdfunding$pAdDeg,f=1/3 ,pch=19,col="blue",xlab="Successful Rate",ylab="Adanced Education",main="GiniCoeff-Adanced Education Plot with lowess line")
points(lowess(crowdfunding$GiniCoeff,crowdfunding$pAdDeg,f=1/3),pch=4,col="red",type="l")
qqplot(crowdfunding$GiniCoeff,crowdfunding$pAdDeg,pch=19,col="red",main="Q-Q Plot: GiniCoeff-Adanced Education")
qqline(crowdfunding$GiniCoeff,crowdfunding$pAdDeg)
the condition has length > 1 and only the first element will be used
#qqnorm(crowdfunding$GiniCoeff,col="orange",xlab="GiniCoeff")
#qqline(crowdfunding$GiniCoeff,col="red")
par(mfrow=c(1,1))
qqnorm(crowdfunding$pAdDeg,col="blue",pch=20,xlab="Adanced Education")
qqline(crowdfunding$pAdDeg,col="red")
require(corpcor)
Loading required package: corpcor
require(ggm)
Loading required package: ggm
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Attaching package: 'ggm'
The following object is masked from 'package:igraph':
pa
xcor=cor(se)#<e7><9b><b8><e5><85><b3><e7><b3><bb><e6><95><b0><e7><9f><a9><e9><98><b5>
xpcor=cor2pcor(xcor)#<e5><81><8f><e7><9b><b8><e5><85><b3><e7><9f><a9><e9><98><b5>
xpcor
[,1] [,2] [,3]
[1,] 1.0000000 0.1683237 0.3227919
[2,] 0.1683237 1.0000000 0.3102785
[3,] 0.3227919 0.3102785 1.0000000
xcor
GiniCoeff pAdDeg successful_rate
GiniCoeff 1.0000000 0.2983904 0.4001989
pAdDeg 0.2983904 1.0000000 0.3908097
successful_rate 0.4001989 0.3908097 1.0000000
require(psych)
Loading required package: psych
Attaching package: 'psych'
The following object is masked from 'package:car':
logit
The following objects are masked from 'package:ggplot2':
%+%, alpha
u<-colnames(xcor)
u
[1] "GiniCoeff" "pAdDeg" "successful_rate"
pcortest_dev<-function(x_set,y,dataset){
require(psych)
require(ggm)
for (nv in length(x_set) ){
data_subset<-dataset
data_subset[x_set[nv]]<-NULL
x_subset=x_set
x_subset=x_subset[-nv]
jsbl <- c(x_subset,y) #<e8><a6><81><e8><ae><a1><e7><ae><97><e7><9a><84><e7><9b><b8><e5><85><b3><e7><b3><bb><e6><95><b0><e7><9a><84><e5><8f><98><e9><87><8f><e4><b8><8b><e6><a0><87>
tjbl <- c(x_set[nv]) #<e6><9d><a1><e4><bb><b6>(<e6><8e><a7><e5><88><b6>)<e5><8f><98><e9><87><8f><e7><9a><84><e4><b8><8b><e6><a0><87><ef><bc><8c><e5><8d><b3><e8><a6><81><e6><8e><92><e9><99><a4><e5><bd><b1><e5><93><8d><e7><9a><84><e5><8f><98><e9><87><8f><e7><9a><84><e4><b8><8b><e6><a0><87>
r<-pcor(c(jsbl,tjbl),cor(dataset))
q <- length(tjbl)
n <- dim(dataset)[1]
print(x_set[nv])
pcor_test<- pcor.test(r,q,n)
print(pcor_test)
}
return(pcor_test)
}
pcortest_dev(c("GiniCoeff","pAdDeg"),c("successful_rate"),se)
[1] "pAdDeg"
$tval
[1] 2.338108
$df
[1] 47
$pvalue
[1] 0.02368857
$tval
[1] 2.338108
$df
[1] 47
$pvalue
[1] 0.02368857
a<-1
a1_temp=lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff)
b1_temp=lm(crowdfunding$pAdDeg~crowdfunding$GiniCoeff)
cor.test(a1_temp$residuals,b1_temp$residuals)
Pearson's product-moment correlation
data: a1_temp$residuals and b1_temp$residuals
t = 2.2613, df = 48, p-value = 0.02831
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.03494915 0.54183081
sample estimates:
cor
0.3102785
a2_temp=lm(crowdfunding$successful_rate~crowdfunding$pAdDeg)
b2_temp=lm(crowdfunding$GiniCoeff~crowdfunding$pAdDeg)
se_s[1]
jsbl <- c("pAdDeg","successful_rate") #<e8><a6><81><e8><ae><a1><e7><ae><97><e7><9a><84><e7><9b><b8><e5><85><b3><e7><b3><bb><e6><95><b0><e7><9a><84><e5><8f><98><e9><87><8f><e4><b8><8b><e6><a0><87>
tjbl <- c("GiniCoeff") #<e6><9d><a1><e4><bb><b6>(<e6><8e><a7><e5><88><b6>)<e5><8f><98><e9><87><8f><e7><9a><84><e4><b8><8b><e6><a0><87><ef><bc><8c><e5><8d><b3><e8><a6><81><e6><8e><92><e9><99><a4><e5><bd><b1><e5><93><8d><e7><9a><84><e5><8f><98><e9><87><8f><e7><9a><84><e4><b8><8b><e6><a0><87>
jsbl <- c("GiniCoeff","successful_rate") #<e8><a6><81><e8><ae><a1><e7><ae><97><e7><9a><84><e7><9b><b8><e5><85><b3><e7><b3><bb><e6><95><b0><e7><9a><84><e5><8f><98><e9><87><8f><e4><b8><8b><e6><a0><87>
tjbl <- c("pAdDeg") #<e6><9d><a1><e4><bb><b6>(<e6><8e><a7><e5><88><b6>)<e5><8f><98><e9><87><8f><e7><9a><84><e4><b8><8b><e6><a0><87><ef><bc><8c><e5><8d><b3><e8><a6><81><e6><8e><92><e9><99><a4><e5><bd><b1><e5><93><8d><e7><9a><84><e5><8f><98><e9><87><8f><e7><9a><84><e4><b8><8b><e6><a0><87>
r<-pcor(c(jsbl,tjbl),cor(se))
q <- length(tjbl) #<e8><ae><a1><e7><ae><97><e8><a6><81><e6><8e><a7><e5><88><b6><e7><9a><84><e5><8f><98><e9><87><8f><e6><95><b0>
n <- dim(se)[1] #<e8><ae><a1><e7><ae><97><e6><a0><b7><e6><9c><ac><e9><87><8f>
pcor_test.GiniCoeff <- pcor.test(r,q,n) #<e5><81><8f><e7><9b><b8><e5><85><b3><e7><b3><bb><e6><95><b0><e6><98><be><e8><91><97><e6><80><a7><e6><a3><80><e9><aa><8c><e7><bb><93><e6><9e><9c><ef><bc><88><e8><be><93><e5><87><ba><e5><ba><8f><e5><8f><b7>3<ef><bc><89>
r.GiniCoeff=r
pcor_test.GiniCoeff
$tval
[1] 2.338108
$df
[1] 47
$pvalue
[1] 0.02368857
pcor_test.pAdDeg <- pcor.test(r,q,n)
r.pAdDeg=r
pcor_test.pAdDeg
$tval
[1] 2.338108
$df
[1] 47
$pvalue
[1] 0.02368857
corr.test(se,use="pairwise")
Call:corr.test(x = se, use = "pairwise")
Correlation matrix
GiniCoeff pAdDeg successful_rate
GiniCoeff 1.0 0.30 0.40
pAdDeg 0.3 1.00 0.39
successful_rate 0.4 0.39 1.00
Sample Size
[1] 50
Probability values (Entries above the diagonal are adjusted for multiple tests.)
GiniCoeff pAdDeg successful_rate
GiniCoeff 0.00 0.04 0.01
pAdDeg 0.04 0.00 0.01
successful_rate 0.00 0.01 0.00
To see confidence intervals of the correlations, print with the short=FALSE option
summary(lm(crowdfunding$GiniCoeff~crowdfunding$pAdDeg))
Call:
lm(formula = crowdfunding$GiniCoeff ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.031714 -0.014215 0.001214 0.013231 0.037791
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.431222 0.009986 43.184 <2e-16 ***
crowdfunding$pAdDeg 0.214191 0.098889 2.166 0.0353 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.01719 on 48 degrees of freedom
Multiple R-squared: 0.08904, Adjusted R-squared: 0.07006
F-statistic: 4.691 on 1 and 48 DF, p-value: 0.03531
cor.test(crowdfunding$GiniCoeff,crowdfunding$pAdDeg)
Pearson's product-moment correlation
data: crowdfunding$GiniCoeff and crowdfunding$pAdDeg
t = 2.166, df = 48, p-value = 0.03531
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.02185813 0.53250982
sample estimates:
cor
0.2983904
summary(lm(log(crowdfunding$GiniCoeff)~log(crowdfunding$pAdDeg)))
Call:
lm(formula = log(crowdfunding$GiniCoeff) ~ log(crowdfunding$pAdDeg))
Residuals:
Min 1Q Median 3Q Max
-0.073531 -0.032117 0.002537 0.028966 0.082244
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.69086 0.05426 -12.732 <2e-16 ***
log(crowdfunding$pAdDeg) 0.04401 0.02295 1.918 0.0611 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.03835 on 48 degrees of freedom
Multiple R-squared: 0.07116, Adjusted R-squared: 0.05181
F-statistic: 3.677 on 1 and 48 DF, p-value: 0.06112
cor.test(log(crowdfunding$GiniCoeff),log(crowdfunding$pAdDeg))
Pearson's product-moment correlation
data: log(crowdfunding$GiniCoeff) and log(crowdfunding$pAdDeg)
t = 1.9176, df = 48, p-value = 0.06112
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.01251929 0.50742841
sample estimates:
cor
0.266758
qqplot(log(crowdfunding$successful_rate),log(crowdfunding$GiniCoeff))
qqplot(log(crowdfunding$successful_rate),log(crowdfunding$pAdDeg))
require(gvlma)
Loading required package: gvlma
summary(gvlma(lm(log(crowdfunding$successful_rate)~log(crowdfunding$pAdDeg))))
Call:
lm(formula = log(crowdfunding$successful_rate) ~ log(crowdfunding$pAdDeg))
Residuals:
Min 1Q Median 3Q Max
-0.99585 -0.16975 0.06631 0.15860 0.35118
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.02673 0.39131 -0.068 0.9458
log(crowdfunding$pAdDeg) 0.43484 0.16552 2.627 0.0115 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2766 on 48 degrees of freedom
Multiple R-squared: 0.1257, Adjusted R-squared: 0.1075
F-statistic: 6.902 on 1 and 48 DF, p-value: 0.01152
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(log(crowdfunding$successful_rate) ~ log(crowdfunding$pAdDeg)))
Value p-value Decision
Global Stat 63.40303 5.582e-13 Assumptions NOT satisfied!
Skewness 23.67087 1.143e-06 Assumptions NOT satisfied!
Kurtosis 35.36041 2.740e-09 Assumptions NOT satisfied!
Link Function 0.01624 8.986e-01 Assumptions acceptable.
Heteroscedasticity 4.35552 3.689e-02 Assumptions NOT satisfied!
summary(gvlma(lm(crowdfunding$successful_rate~crowdfunding$pAdDeg)))
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.22412 -0.06718 0.01152 0.04708 0.15306
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.22570 0.04815 4.688 2.31e-05 ***
crowdfunding$pAdDeg 1.40251 0.47679 2.942 0.00501 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.0829 on 48 degrees of freedom
Multiple R-squared: 0.1527, Adjusted R-squared: 0.1351
F-statistic: 8.653 on 1 and 48 DF, p-value: 0.005015
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(crowdfunding$successful_rate ~ crowdfunding$pAdDeg))
Value p-value Decision
Global Stat 4.3514 0.3605 Assumptions acceptable.
Skewness 1.8403 0.1749 Assumptions acceptable.
Kurtosis 0.1144 0.7351 Assumptions acceptable.
Link Function 0.6963 0.4040 Assumptions acceptable.
Heteroscedasticity 1.7004 0.1922 Assumptions acceptable.
summary(gvlma(lm(log(crowdfunding$successful_rate)~log(crowdfunding$GiniCoeff))))
Call:
lm(formula = log(crowdfunding$successful_rate) ~ log(crowdfunding$GiniCoeff))
Residuals:
Min 1Q Median 3Q Max
-0.89272 -0.13415 0.03076 0.16062 0.50236
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.3738 0.7782 1.765 0.08385 .
log(crowdfunding$GiniCoeff) 3.0507 0.9784 3.118 0.00307 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2697 on 48 degrees of freedom
Multiple R-squared: 0.1684, Adjusted R-squared: 0.1511
F-statistic: 9.722 on 1 and 48 DF, p-value: 0.003074
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(log(crowdfunding$successful_rate) ~ log(crowdfunding$GiniCoeff)))
Value p-value Decision
Global Stat 28.9877 7.862e-06 Assumptions NOT satisfied!
Skewness 11.4306 7.225e-04 Assumptions NOT satisfied!
Kurtosis 12.4173 4.254e-04 Assumptions NOT satisfied!
Link Function 0.5972 4.396e-01 Assumptions acceptable.
Heteroscedasticity 4.5427 3.306e-02 Assumptions NOT satisfied!
summary(gvlma(lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff)))
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$GiniCoeff)
Residuals:
Min 1Q Median 3Q Max
-0.197648 -0.054730 -0.003818 0.055170 0.201729
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.5417 0.2993 -1.810 0.07655 .
crowdfunding$GiniCoeff 2.0008 0.6613 3.026 0.00398 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08254 on 48 degrees of freedom
Multiple R-squared: 0.1602, Adjusted R-squared: 0.1427
F-statistic: 9.154 on 1 and 48 DF, p-value: 0.003981
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(crowdfunding$successful_rate ~ crowdfunding$GiniCoeff))
Value p-value Decision
Global Stat 2.77666 0.5959 Assumptions acceptable.
Skewness 0.03904 0.8434 Assumptions acceptable.
Kurtosis 0.03367 0.8544 Assumptions acceptable.
Link Function 0.11971 0.7294 Assumptions acceptable.
Heteroscedasticity 2.58424 0.1079 Assumptions acceptable.
summary(lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff))
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$GiniCoeff)
Residuals:
Min 1Q Median 3Q Max
-0.197648 -0.054730 -0.003818 0.055170 0.201729
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.5417 0.2993 -1.810 0.07655 .
crowdfunding$GiniCoeff 2.0008 0.6613 3.026 0.00398 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08254 on 48 degrees of freedom
Multiple R-squared: 0.1602, Adjusted R-squared: 0.1427
F-statistic: 9.154 on 1 and 48 DF, p-value: 0.003981
par(mfrow=c(2,2))
plot(lm(log(crowdfunding$successful_rate)~log(crowdfunding$pAdDeg)))
plot(lm(crowdfunding$successful_rate~crowdfunding$pAdDeg))
plot(lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff))
SR2Gini<-lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff)
cor.test(crowdfunding$successful_rate,crowdfunding$GiniCoeff,method = "spearman")
Cannot compute exact p-value with ties
Spearman's rank correlation rho
data: crowdfunding$successful_rate and crowdfunding$GiniCoeff
S = 13615, p-value = 0.01378
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.3462269
summary(lm(SR2Gini$residuals~crowdfunding$pAdDeg))
Call:
lm(formula = SR2Gini$residuals ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.187967 -0.048021 -0.005676 0.052160 0.167582
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.09539 0.04578 -2.083 0.0426 *
crowdfunding$pAdDeg 0.97396 0.45341 2.148 0.0368 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07884 on 48 degrees of freedom
Multiple R-squared: 0.0877, Adjusted R-squared: 0.06869
F-statistic: 4.614 on 1 and 48 DF, p-value: 0.03678
cor.test(crowdfunding$successful_rate,crowdfunding$pAdDeg,method = "spearman")
Cannot compute exact p-value with ties
Spearman's rank correlation rho
data: crowdfunding$successful_rate and crowdfunding$pAdDeg
S = 12634, p-value = 0.004719
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.3933076
summary(gvlma(lm(SR2Gini$residuals~crowdfunding$pAdDeg)))
Call:
lm(formula = SR2Gini$residuals ~ crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.187967 -0.048021 -0.005676 0.052160 0.167582
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.09539 0.04578 -2.083 0.0426 *
crowdfunding$pAdDeg 0.97396 0.45341 2.148 0.0368 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07884 on 48 degrees of freedom
Multiple R-squared: 0.0877, Adjusted R-squared: 0.06869
F-statistic: 4.614 on 1 and 48 DF, p-value: 0.03678
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(SR2Gini$residuals ~ crowdfunding$pAdDeg))
Value p-value Decision
Global Stat 2.96167 0.5643 Assumptions acceptable.
Skewness 0.38039 0.5374 Assumptions acceptable.
Kurtosis 0.01984 0.8880 Assumptions acceptable.
Link Function 1.96967 0.1605 Assumptions acceptable.
Heteroscedasticity 0.59177 0.4417 Assumptions acceptable.
SR2ad<-lm(crowdfunding$successful_rate~crowdfunding$pAdDeg)
cor.test(crowdfunding$successful_rate,crowdfunding$pAdDeg)
Pearson's product-moment correlation
data: crowdfunding$successful_rate and crowdfunding$pAdDeg
t = 2.9415, df = 48, p-value = 0.005015
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.1261889 0.6035073
sample estimates:
cor
0.3908097
summary(lm(SR2ad$residuals~crowdfunding$GiniCoeff))
Call:
lm(formula = SR2ad$residuals ~ crowdfunding$GiniCoeff)
Residuals:
Min 1Q Median 3Q Max
-0.195484 -0.051186 0.004758 0.054168 0.147777
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6411 0.2860 -2.242 0.0296 *
crowdfunding$GiniCoeff 1.4178 0.6319 2.244 0.0295 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07887 on 48 degrees of freedom
Multiple R-squared: 0.09492, Adjusted R-squared: 0.07606
F-statistic: 5.034 on 1 and 48 DF, p-value: 0.02951
summary(gvlma(lm(SR2ad$residuals~crowdfunding$GiniCoeff)))
Call:
lm(formula = SR2ad$residuals ~ crowdfunding$GiniCoeff)
Residuals:
Min 1Q Median 3Q Max
-0.195484 -0.051186 0.004758 0.054168 0.147777
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6411 0.2860 -2.242 0.0296 *
crowdfunding$GiniCoeff 1.4178 0.6319 2.244 0.0295 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07887 on 48 degrees of freedom
Multiple R-squared: 0.09492, Adjusted R-squared: 0.07606
F-statistic: 5.034 on 1 and 48 DF, p-value: 0.02951
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(SR2ad$residuals ~ crowdfunding$GiniCoeff))
Value p-value Decision
Global Stat 2.34938 0.6718 Assumptions acceptable.
Skewness 1.05702 0.3039 Assumptions acceptable.
Kurtosis 0.04151 0.8386 Assumptions acceptable.
Link Function 0.83145 0.3619 Assumptions acceptable.
Heteroscedasticity 0.41941 0.5172 Assumptions acceptable.
summary(gvlma(lm(crowdfunding$successful_rate~crowdfunding$GiniCoeff+crowdfunding$pAdDeg)))
Call:
lm(formula = crowdfunding$successful_rate ~ crowdfunding$GiniCoeff +
crowdfunding$pAdDeg)
Residuals:
Min 1Q Median 3Q Max
-0.195999 -0.049936 -0.001397 0.053631 0.160600
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.4454 0.2907 -1.532 0.1322
crowdfunding$GiniCoeff 1.5563 0.6656 2.338 0.0237 *
crowdfunding$pAdDeg 1.0692 0.4778 2.238 0.0300 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.0793 on 47 degrees of freedom
Multiple R-squared: 0.241, Adjusted R-squared: 0.2087
F-statistic: 7.462 on 2 and 47 DF, p-value: 0.001533
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(crowdfunding$successful_rate ~ crowdfunding$GiniCoeff + crowdfunding$pAdDeg))
Value p-value Decision
Global Stat 4.746089 0.31436 Assumptions acceptable.
Skewness 0.710171 0.39939 Assumptions acceptable.
Kurtosis 0.002151 0.96300 Assumptions acceptable.
Link Function 3.157228 0.07559 Assumptions acceptable.
Heteroscedasticity 0.876539 0.34915 Assumptions acceptable.
require(car)
#SR2Gini---------
qqPlot(SR2Gini,labels=row.names(crowdfunding),id.method="identify",simulate=TRUE,main="Q-Q Plot")
influencePlot(SR2Gini,labels=row.names(crowdfunding),id.method="identify",main="Influence Plot", sub="Circle size if proportional to Cook's distance")
#SR2all----------
SR2GiniAdedc<-lm(successful_rate~GiniCoeff+pAdDeg,data=crowdfunding)
qqPlot(SR2GiniAdedc,labels=row.names(crowdfunding),id.method="identify",simulate=TRUE,main="Q-Q Plot")
influencePlot(SR2GiniAdedc,labels=row.names(crowdfunding),id.method="identify",main="Influence Plot", sub="Circle size if proportional to Cook's distance")
#
anova(SR2GiniAdedc)
Analysis of Variance Table
Response: successful_rate
Df Sum Sq Mean Sq F value Pr(>F)
GiniCoeff 1 0.062361 0.062361 9.9178 0.002844 **
pAdDeg 1 0.031482 0.031482 5.0068 0.030026 *
Residuals 47 0.295525 0.006288
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(gvlma(lm(successful_rate~NPov000s,data=crowdfunding)))
Call:
lm(formula = successful_rate ~ NPov000s, data = crowdfunding)
Residuals:
Min 1Q Median 3Q Max
-0.230673 -0.041789 -0.001671 0.045678 0.193621
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.541e-01 1.642e-02 21.560 <2e-16 ***
NPov000s 9.537e-06 1.113e-05 0.857 0.396
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08938 on 48 degrees of freedom
Multiple R-squared: 0.01507, Adjusted R-squared: -0.005451
F-statistic: 0.7343 on 1 and 48 DF, p-value: 0.3957
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(successful_rate ~ NPov000s, data = crowdfunding))
Value p-value Decision
Global Stat 6.8904 0.14179 Assumptions acceptable.
Skewness 0.5449 0.46041 Assumptions acceptable.
Kurtosis 0.5976 0.43948 Assumptions acceptable.
Link Function 0.9871 0.32046 Assumptions acceptable.
Heteroscedasticity 4.7608 0.02911 Assumptions NOT satisfied!
SR2ginieduclevel<-lm(successful_rate~pAdDeg+PovRate1,data=crowdfunding)
summary(gvlma(SR2ginieduclevel))
Call:
lm(formula = successful_rate ~ pAdDeg + PovRate1, data = crowdfunding)
Residuals:
Min 1Q Median 3Q Max
-0.180982 -0.056105 -0.000637 0.054745 0.142832
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.06244 0.09334 -0.669 0.50678
pAdDeg 2.24363 0.49262 4.554 3.73e-05 ***
PovRate1 1.39012 0.39874 3.486 0.00107 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07468 on 47 degrees of freedom
Multiple R-squared: 0.3268, Adjusted R-squared: 0.2982
F-statistic: 11.41 on 2 and 47 DF, p-value: 9.144e-05
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = SR2ginieduclevel)
Value p-value Decision
Global Stat 2.4121 0.6604 Assumptions acceptable.
Skewness 0.2126 0.6448 Assumptions acceptable.
Kurtosis 0.3593 0.5489 Assumptions acceptable.
Link Function 1.6219 0.2028 Assumptions acceptable.
Heteroscedasticity 0.2184 0.6403 Assumptions acceptable.
logSR2ginieduclevel<-lm(log(successful_rate)~log(pAdDeg)+log(PovRate1),data=crowdfunding)
summary(gvlma(logSR2ginieduclevel))
Call:
lm(formula = log(successful_rate) ~ log(pAdDeg) + log(PovRate1),
data = crowdfunding)
Residuals:
Min 1Q Median 3Q Max
-0.85136 -0.12078 0.03723 0.16421 0.32414
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.1251 0.6603 3.218 0.002339 **
log(pAdDeg) 0.7485 0.1675 4.468 4.96e-05 ***
log(PovRate1) 0.7320 0.1915 3.823 0.000387 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2441 on 47 degrees of freedom
Multiple R-squared: 0.3331, Adjusted R-squared: 0.3047
F-statistic: 11.74 on 2 and 47 DF, p-value: 7.329e-05
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = logSR2ginieduclevel)
Value p-value Decision
Global Stat 26.409 2.616e-05 Assumptions NOT satisfied!
Skewness 13.302 2.652e-04 Assumptions NOT satisfied!
Kurtosis 10.646 1.103e-03 Assumptions NOT satisfied!
Link Function 1.454 2.278e-01 Assumptions acceptable.
Heteroscedasticity 1.007 3.155e-01 Assumptions acceptable.
test1<-lm(pAdDeg~PovRate1,data=crowdfunding)
test2<-lm(PovRate1~pAdDeg,data=crowdfunding)
plot(SR2ginieduclevel)
anova(SR2ginieduclevel)
Analysis of Variance Table
Response: successful_rate
Df Sum Sq Mean Sq F value Pr(>F)
pAdDeg 1 0.059469 0.059469 10.663 0.002043 **
PovRate1 1 0.067783 0.067783 12.154 0.001073 **
Residuals 47 0.262116 0.005577
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#plot(crowdfunding$education_leverage,crowdfunding$successful_rate)
#boxplot(crowdfunding$successful_rate[crowdfunding$education_leverage==1],crowdfunding$successful_rate[crowdfunding$education_leverage==6])
#vif:Variance Inflation Factor----------
vif(SR2GiniAdedc)
GiniCoeff pAdDeg
1.097739 1.097739
vif(SR2ginieduclevel)
pAdDeg PovRate1
1.315553 1.315553
sqrt(vif(SR2GiniAdedc))>2
GiniCoeff pAdDeg
FALSE FALSE
sqrt(vif(SR2ginieduclevel))>2
pAdDeg PovRate1
FALSE FALSE
#PCA---------
prcomp(~pAdDeg+PovRate1,data=crowdfunding)
Standard deviations:
[1] 0.03444520 0.01929402
Rotation:
PC1 PC2
pAdDeg -0.5482532 -0.8363124
PovRate1 0.8363124 -0.5482532
require(moments)
kurtosis(crowdfunding$successful_rate)
[1] 3.630147
skewness(crowdfunding$successful_rate)
[1] -0.3574304
summary(gvlma(lm(crowdfunding$successful_rate~test1$residuals)))
Call:
lm(formula = crowdfunding$successful_rate ~ test1$residuals)
Residuals:
Min 1Q Median 3Q Max
-0.193509 -0.054867 0.003501 0.055271 0.137047
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.36306 0.01068 33.999 < 2e-16 ***
test1$residuals 2.24363 0.49810 4.504 4.26e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.07551 on 48 degrees of freedom
Multiple R-squared: 0.2971, Adjusted R-squared: 0.2825
F-statistic: 20.29 on 1 and 48 DF, p-value: 4.259e-05
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(crowdfunding$successful_rate ~ test1$residuals))
Value p-value Decision
Global Stat 4.3345 0.36263 Assumptions acceptable.
Skewness 0.8744 0.34974 Assumptions acceptable.
Kurtosis 0.1683 0.68162 Assumptions acceptable.
Link Function 3.0237 0.08206 Assumptions acceptable.
Heteroscedasticity 0.2681 0.60463 Assumptions acceptable.
summary(gvlma(lm(crowdfunding$successful_rate~test2$residuals)))
Call:
lm(formula = crowdfunding$successful_rate ~ test2$residuals)
Residuals:
Min 1Q Median 3Q Max
-0.194923 -0.055056 -0.003674 0.055637 0.192004
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.36306 0.01158 31.365 < 2e-16 ***
test2$residuals 1.39012 0.43704 3.181 0.00257 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.08185 on 48 degrees of freedom
Multiple R-squared: 0.1741, Adjusted R-squared: 0.1569
F-statistic: 10.12 on 1 and 48 DF, p-value: 0.002574
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(crowdfunding$successful_rate ~ test2$residuals))
Value p-value Decision
Global Stat 5.248197 0.26277 Assumptions acceptable.
Skewness 0.002307 0.96169 Assumptions acceptable.
Kurtosis 0.017605 0.89444 Assumptions acceptable.
Link Function 3.162908 0.07533 Assumptions acceptable.
Heteroscedasticity 2.065378 0.15068 Assumptions acceptable.